|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
SecurityContext4J2EEImpl.java | 0% | 0% | 0% | 0% |
|
1 |
/*
|
|
2 |
* Copyright 2001-2004 The Apache Software Foundation.
|
|
3 |
*
|
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5 |
* you may not use this file except in compliance with the License.
|
|
6 |
* You may obtain a copy of the License at
|
|
7 |
*
|
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9 |
*
|
|
10 |
* Unless required by applicable law or agreed to in writing, software
|
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13 |
* See the License for the specific language governing permissions and
|
|
14 |
* limitations under the License.
|
|
15 |
*/
|
|
16 |
|
|
17 |
package org.apache.geronimo.ews.ws4j2ee.context.security.impl;
|
|
18 |
|
|
19 |
import org.apache.geronimo.ews.ws4j2ee.context.security.SecurityContext4J2EE;
|
|
20 |
|
|
21 |
import javax.security.auth.callback.CallbackHandler;
|
|
22 |
import javax.security.cert.X509Certificate;
|
|
23 |
|
|
24 |
/**
|
|
25 |
* @author Rajith Priyanga (rpriyanga@yahoo.com)
|
|
26 |
* @date Apr 6, 2004
|
|
27 |
*/
|
|
28 |
public class SecurityContext4J2EEImpl implements SecurityContext4J2EE { |
|
29 |
|
|
30 |
private String nonce = null; |
|
31 |
private String created = null; |
|
32 |
private String username = null; |
|
33 |
private char[] pwd = null; |
|
34 |
|
|
35 |
private X509Certificate x509Cert = null; |
|
36 |
private byte[] kerberosTicket = null; |
|
37 |
|
|
38 |
private boolean privacy = false; |
|
39 |
private boolean integrity = false; |
|
40 |
private boolean isPwdDigested = false; |
|
41 |
private CallbackHandler cbh;
|
|
42 |
|
|
43 | 0 |
public SecurityContext4J2EEImpl() {
|
44 |
} |
|
45 |
|
|
46 |
/**
|
|
47 |
* @see org.apache.geranimo.ews.ws4j2ee.context.security.SecurityContext4J2EE#sufficientIntegrity()
|
|
48 |
*/
|
|
49 | 0 |
public boolean sufficientIntegrity() { |
50 |
// TODO
|
|
51 | 0 |
return false; |
52 |
} |
|
53 |
|
|
54 |
/**
|
|
55 |
* @see org.apache.geranimo.ews.ws4j2ee.context.security.SecurityContext4J2EE#sufficientPrivacy()
|
|
56 |
*/
|
|
57 | 0 |
public boolean sufficientPrivacy() { |
58 |
// TODO
|
|
59 | 0 |
return false; |
60 |
} |
|
61 |
|
|
62 |
/**
|
|
63 |
* @see org.apache.geranimo.ews.ws4j2ee.context.security.SecurityContext4J2EE#getNonce()
|
|
64 |
*/
|
|
65 | 0 |
public String getNonce() {
|
66 | 0 |
return this.nonce; |
67 |
} |
|
68 |
|
|
69 |
/**
|
|
70 |
* @see org.apache.geranimo.ews.ws4j2ee.context.security.SecurityContext4J2EE#getCreated()
|
|
71 |
*/
|
|
72 | 0 |
public String getCreated() {
|
73 | 0 |
return this.created; |
74 |
} |
|
75 |
|
|
76 |
/**
|
|
77 |
* @see org.apache.geranimo.ews.ws4j2ee.context.security.SecurityContext4J2EE#getPasswordDigest()
|
|
78 |
*/
|
|
79 | 0 |
public char[] getPasswordDigest() { |
80 | 0 |
if (this.isPwdDigested) |
81 | 0 |
return this.pwd; |
82 |
else
|
|
83 | 0 |
return null; |
84 |
} |
|
85 |
|
|
86 |
/**
|
|
87 |
* @see org.apache.geranimo.ews.ws4j2ee.context.security.SecurityContext4J2EE#getPasswordText()
|
|
88 |
*/
|
|
89 | 0 |
public char[] getPasswordText() { |
90 | 0 |
if (this.isPwdDigested) |
91 | 0 |
return null; |
92 |
else
|
|
93 | 0 |
return this.pwd; |
94 |
} |
|
95 |
|
|
96 |
/**
|
|
97 |
* @see org.apache.geranimo.ews.ws4j2ee.context.security.SecurityContext4J2EE#getUsername()
|
|
98 |
*/
|
|
99 | 0 |
public String getUsername() {
|
100 | 0 |
return this.username; |
101 |
} |
|
102 |
|
|
103 |
/**
|
|
104 |
* Sets the created.
|
|
105 |
*
|
|
106 |
* @param created The created to set
|
|
107 |
*/
|
|
108 | 0 |
public void setCreated(String created) { |
109 | 0 |
this.created = created;
|
110 |
} |
|
111 |
|
|
112 |
/**
|
|
113 |
* Sets the integrity.
|
|
114 |
*
|
|
115 |
* @param integrity The integrity to set
|
|
116 |
*/
|
|
117 | 0 |
public void setIntegritySufficient(boolean sufficient) { |
118 | 0 |
this.integrity = sufficient;
|
119 |
} |
|
120 |
|
|
121 |
/**
|
|
122 |
* Sets the nonce.
|
|
123 |
*
|
|
124 |
* @param nonce The nonce to set
|
|
125 |
*/
|
|
126 | 0 |
public void setNonce(String nonce) { |
127 | 0 |
this.nonce = nonce;
|
128 |
} |
|
129 |
|
|
130 |
/**
|
|
131 |
* Sets the privacy.
|
|
132 |
*
|
|
133 |
* @param privacy The privacy to set
|
|
134 |
*/
|
|
135 | 0 |
public void setPrivacySufficient(boolean sufficient) { |
136 | 0 |
this.privacy = sufficient;
|
137 |
} |
|
138 |
|
|
139 |
/**
|
|
140 |
* Sets the username.
|
|
141 |
*
|
|
142 |
* @param username The username to set
|
|
143 |
*/
|
|
144 | 0 |
public void setUsername(String username) { |
145 | 0 |
this.username = username;
|
146 |
} |
|
147 |
|
|
148 |
/**
|
|
149 |
* @see org.apache.geranimo.ews.ws4j2ee.context.security.SecurityContext4J2EE#getX509Certificate()
|
|
150 |
*/
|
|
151 | 0 |
public X509Certificate getX509Certificate() {
|
152 | 0 |
return this.x509Cert; |
153 |
} |
|
154 |
|
|
155 |
/**
|
|
156 |
* @see org.apache.geranimo.ews.ws4j2ee.context.security.SecurityContext4J2EE#getKerberoseTicket()
|
|
157 |
*/
|
|
158 | 0 |
public byte[] getKerberoseTicket() { |
159 | 0 |
return this.kerberosTicket; |
160 |
} |
|
161 |
|
|
162 |
/**
|
|
163 |
* Sets the kerberosTicket.
|
|
164 |
*
|
|
165 |
* @param kerberosTicket The kerberosTicket to set
|
|
166 |
*/
|
|
167 | 0 |
public void setKerberosTicket(byte[] kerberosTicket) { |
168 | 0 |
this.kerberosTicket = kerberosTicket;
|
169 |
} |
|
170 |
|
|
171 |
/**
|
|
172 |
* Sets the x509Cert.
|
|
173 |
*
|
|
174 |
* @param x509Cert The x509Cert to set
|
|
175 |
*/
|
|
176 | 0 |
public void setX509Certificate(X509Certificate x509Cert) { |
177 | 0 |
this.x509Cert = x509Cert;
|
178 |
} |
|
179 |
|
|
180 |
/**
|
|
181 |
* Sets the pwdDigest.
|
|
182 |
*
|
|
183 |
* @param pwdDigest The pwdDigest to set
|
|
184 |
*/
|
|
185 | 0 |
public void setPasswordDigested(boolean isPwdDigested) { |
186 | 0 |
this.isPwdDigested = isPwdDigested;
|
187 |
} |
|
188 |
|
|
189 |
/**
|
|
190 |
* @return boolean
|
|
191 |
*/
|
|
192 | 0 |
public boolean isPasswordDigested() { |
193 | 0 |
return isPwdDigested;
|
194 |
} |
|
195 |
|
|
196 |
/**
|
|
197 |
* Sets the pwd.
|
|
198 |
*
|
|
199 |
* @param pwd The pwd to set
|
|
200 |
*/
|
|
201 | 0 |
public void setPassword(char[] password) { |
202 | 0 |
this.pwd = password;
|
203 |
} |
|
204 |
|
|
205 |
/**
|
|
206 |
* @see org.apache.geranimo.ews.ws4j2ee.context.security.SecurityContext4J2EE#getPWDCallbackHandler4J2EE()
|
|
207 |
*/
|
|
208 | 0 |
public CallbackHandler getPWDCallbackHandler4J2EE() {
|
209 | 0 |
return this.cbh; |
210 |
} |
|
211 |
|
|
212 | 0 |
public void setPWDCallbackHandler4J2EE(CallbackHandler callbackHandler) { |
213 | 0 |
this.cbh = callbackHandler;
|
214 |
} |
|
215 |
|
|
216 |
} |
|
217 |
|
|